package org.springcloud.wisdom.amusement.controller.sys;

import org.springcloud.wisdom.amusement.bean.ResponseData;
import org.springcloud.wisdom.amusement.controller.BaseController;
import org.springcloud.wisdom.amusement.service.INotice_StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

//这个功能删除了
@RestController
@CrossOrigin
@RequestMapping("/sys/notice2")
public class Notice_StudentController extends BaseController {
    @Autowired
    INotice_StudentService noticeStudentService;
    //获取报名信息
    @GetMapping("gets")
    public ResponseData<Object> getSignStudent(Integer teamid) {
        return returnObject(noticeStudentService.getSignStudent(teamid));
    }
    @GetMapping("gets1")
    public ResponseData<Object> getSignStudentPage(int currentPage, int size, Integer teamid) {
        return returnObject(noticeStudentService.getSignStudentPage(currentPage, size, teamid));
    }

    //报名活动
    @PostMapping("add")
    public ResponseData<Boolean> addNotice(Integer teamid, String sid, Integer noticeid) {
        return returnBoolean(noticeStudentService.addSignStudent(teamid, sid, noticeid));
    }

    //改你没有加requestBody  后面出错过来改这个
    //审核通过
    @PutMapping("update")
    public ResponseData<Boolean> signSuccess(Integer id) {
        return returnBoolean(noticeStudentService.signSuccess(id));
    }
    //审核不通过
    @PutMapping("update2")
    public ResponseData<Boolean> signFail(Integer id) {
        return returnBoolean(noticeStudentService.signFail(id));
    }




}
